Public Partial Class WebParts
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Private Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
        Select Case DropDownList1.SelectedValue
            Case "Browse"
                WebPartManager1.DisplayMode = WebPartManager.BrowseDisplayMode
            Case "Design"
                WebPartManager1.DisplayMode = WebPartManager.DesignDisplayMode
            Case "Catalog"
                WebPartManager1.DisplayMode = WebPartManager.CatalogDisplayMode
            Case "Edit"
                WebPartManager1.DisplayMode = WebPartManager.EditDisplayMode
            Case Else

        End Select
    End Sub
End Class